{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<!-- language: lang-none -->\n",
    "\n",
    "    ██████╗ ███████╗████████╗ \n",
    "    ██╔══██╗██╔════╝╚══██╔══╝ \n",
    "    ██║  ██║█████╗     ██║    \n",
    "    ██║  ██║██╔══╝     ██║    \n",
    "    ██████╔╝███████╗   ██║    \n",
    "    ╚═════╝ ╚══════╝   ╚═╝    \n",
    "    \n",
    "    Deep Learning Training Platform\n",
    "    Determined AI ©️ 2020"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# JupyterLab Notebooks in Determined\n",
    "\n",
    "Determined makes managing the environment and resources of JupyterLab easy by using containerized instances.\n",
    "\n",
    "## Persistence\n",
    "\n",
    "Users should save any relevant notebook outputs to shared_fs directory to ensure their work is persisted.\n",
    "\n",
    "## Idle Timeout\n",
    "\n",
    "JupyterLab Notebooks in Determined have a configurable timeout that will automatically shut down the notebook instance\n",
    "after the desired timeout period if no kernels or terminal are running. This can be set via the `idle_timeout` key in the notebook configuration.\n",
    "\n",
    "**if you open a Notebook file it might open a kernel for you, and the kernels and the terminals will not be shut down automatically.\n",
    "You need to manually shut down the kernels to make idle timeout effective.**\n",
    "\n",
    "## Environment\n",
    "\n",
    "Run the following code to print out the environment information."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import subprocess\n",
    "\n",
    "try: \n",
    "    print(subprocess.check_output(\"nvidia-smi\", encoding=\"utf-8\"))\n",
    "except (FileNotFoundError, subprocess.CalledProcessError):\n",
    "    import psutil\n",
    "    print(\"No GPUs available. Number of CPUs: \", psutil.cpu_count())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import tensorflow\n",
    "from tensorflow import keras\n",
    "import torch\n",
    "\n",
    "print(\"TensorFlow version: \", tensorflow.__version__)\n",
    "print(\"Keras version: \", keras.__version__)\n",
    "print(\"PyTorch version: \", torch.__version__)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.13"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
